package com.future.product.controller;

import com.future.product.ProductDO;
import com.future.product.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/product")
@RestController
public class ProductController {

    @Autowired
    private ProductService productService;

    @GetMapping("/get/{id}")
    public ProductDO getProduct(@PathVariable("id") Integer id) {
        return productService.get(id);
    }
}
